<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/static/include/taglib.jsp"%>
<!DOCTYPE html >
<html>
<head>
 <meta name="viewport" content="width=device-width" />
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
 <title>后台管理--模板编辑</title>
   <link href="${ctxStatic}/ligeruilib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css">
 <link href="${ctxStatic}/layui/css/layui.css" rel="stylesheet" />
 <link href="${ctxStatic}/css/kpiuitanchu.css" rel="stylesheet" />
 <script src="${ctxStatic}/js/jquery-1.8.3.min.js?v=2.0" type="text/javascript"></script>
 <script src="${ctxStatic}/layui/layui.all.js"  type="text/javascript"></script>
 
  <script src="${ctxStatic}/ligeruilib/ligerUI/js/core/base.js" type="text/javascript"></script>
 <script src="${ctxStatic}/ligeruilib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
 <script src="${ctxStatic}/ligeruilib/ligerUI/js/plugins/ligerTree.js" type="text/javascript"></script>
  <script src="${ctxStatic}/ligeruilib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
 <script src="${ctxStatic}/js/common.js" type="text/javascript"></script>
 
 <style>
tbody td{height:38px;color:#ffffff}
  .selftable tbody td input{text-align: center}
  .layui-table-edit{position: static;}
  .selftable .layui-input, .layui-select, .layui-textarea{height:auto}
  .input_back{background: transparent;}
  .selftable .layui-textarea{margin-top:0;background: transparent;border:0;
  height:auto;line-height:20px;resize:none}
 </style>
 
 <script>
 $(function(){
	 InitOrg();
 })
 
  function InitOrg(){
	  var comboboxm=$("#orgid").ligerComboBox({
			valueField : 'orgid',
			textField : 'orgname',
			selectBoxWidth : 408,
			selectBoxHeight:300,
			treeLeafOnly:false,
			valueFieldID:"hid",
			tree: {url : '../common/get_org_list?orgtype=1',
				checkbox: false, 
				nodeWidth:150,
				ajaxType: 'get', 
				idFieldName: 'orgid',
				textFieldName:"orgname",
				idField:"orgid",
	        	parentIDField:"orgparentid"
			},
			onSelected : function(orgid, orgname) {// id为空值，name为选择的值
				$("#hidgroupid").val(orgid);
			},
			width : 410
		});
		return comboboxm;
  }
 </script>
</head>
<body>
<div style="">
 <form class="layui-form" id="formedit" name="formedit" action="add_usertemp" method="post" target="d41d8cd98f00b204e9800998ecf8427e">
      <iframe name="d41d8cd98f00b204e9800998ecf8427e" src="about:blank" style="display:none;"></iframe>
       <div style="margin:0 auto;margin-top: 10px;width:90%;color:#ffffff">
        <table style="width:100%" >
         <tr>
           <td style="width:120px;text-align: right">所属机构：</td>
		   <td >
		         <input type="text" id="orgid"   class="layui-input" lay-verify="required">
		         <input type="hidden" id="hidgroupid" name="groupid" value="" lay-verify="required" />
		   </td>
         </tr>
         <tr>
          <td style="width:120px;text-align: right">  模板名称：</td>
          <td >
           <input type="text" name="templatename" lay-verify="required" autocomplete="off" class="layui-input"  value="${ustempentity.templatename }">
          </td>
        
        
         </tr>
         <tr>
            <td style="text-align: right">考核期开始时间：</td>
          <td >
           <input type="text" id="begintime" name="begintime" lay-verify="required|date" autocomplete="off" class="layui-input" value="<fmt:formatDate value='${ustempentity.begintime}' pattern='yyyy-MM-dd'/>">
          </td>
         
         </tr>
         <tr>
          <td style="text-align: right">考核期结束时间：</td>
          <td >
           <input type="text" id="endtime" name="endtime" lay-verify="required|date" autocomplete="off" class="layui-input" value="<fmt:formatDate value='${ustempentity.endtime}' pattern='yyyy-MM-dd'/>" >
          </td>
         </tr>
       
         <tr>
            <td style="width:70px;text-align: right">描述：</td>
          <td >
            <textarea class="layui-textarea"  name="templatedes"  >${ustempentity.templatedes }</textarea>
          </td>
       
         </tr>
         <tr>
           <td style="text-align: center" colspan="2">
           <button class="button" lay-submit="" lay-filter="demo1" id="btnsave">保存模板</button>
           <input type="button" value="关闭" class="button" style="margin-top:10px" onclick="top.CloseOpenWindow()"/>
          </td>
         </tr>
         </table>
      </div>

      <input type="hidden" value="${templateid}" name="templateid" >
 
      
     </form>
     </div>
     
      <script>
     layui.use(['form','laydate'], function() {
		 var form = layui.form;
		 var laydate = layui.laydate;
		 
		
		 laydate.render({
			    elem: '#begintime'
		   });
		   laydate.render({
			    elem: '#endtime'
		   });
		   form.render();
		   
	});
     

     function CloseDialog(result,msg){
    	 top.frames["iframe"].vUserTemp.addresult(result,msg);		
      }
     </script>
</body>
</html>